import request from '@/utils/request'


export function riskManagementList(data) { //表格查询
  return request({
    url: '/project-management/api/risk/management/page',
    method: 'POST',
    data
  })
}

export function riskManagementListAll(data) { //表格查询
  return request({
    url: '/project-management/api/risk/management/riskManagement',
    method: 'POST',
    data
  })
}
export function riskManagementAddShow() { //判断是否有添加权限
  return request({
    url: '/project-management/api/risk/group/role',
    method: 'POST',
  })
}
export function riskManagementAdd(data) { //添加
  return request({
    url: '/project-management/api/risk/management',
    method: 'POST',
    data
  })
}
//原 put
export function riskManagementEdit(data) { //编辑
  return request({
    url: '/project-management/api/risk/management/put',
    method: 'post',
    data
  })
}
export function riskManagementDetails(id) { //详情
  return request({
    url: '/project-management/api/risk/management/' + id,
    method: 'GET',
  })
}
//原 del
export function riskManagementDelete(id) { //删除
  return request({
    url: '/project-management/api/risk/management/del/' + id,
    method: 'get',
  })
}
export function riskManagementExport(data) { //导出
  return request({
    url: '/project-management/api/risk/management/export',
    responseType: 'arraybuffer',
    method: 'POST',
    data,
  })
}
//原 put
export function riskManagementWarehousing(data) { //风险管理-风险入库
  return request({
    url: '/project-management/api/risk/archive/put/archive',
    method: 'post',
    data
  })
}
export function riskManagementAllTree() { //台账管理-设备台账-查询权限内设施设备树
  return request({
    url: '/project-quality/api/equipmentInfo/allTree',
    method: 'GET',
  })
}
export function riskManagementhistory(data) { //台账管理-设备台账-查询权限内设施设备树
  return request({
    url: '/project-management/api/risk/management/history/page',
    method: 'post',
    data
  })
}


export function riskManagementDetailsByEdis(params) { //风险管理-通过edis编码获取详细信息
  return request({
    url: '/project-management/api/risk/management/edis',
    method: 'GET',
    params
  })
}